/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package commons.io.FilenameUtils;

import org.apache.commons.io.FilenameUtils;

/**
 *
 * @author WangShuai
 */
public class Demo1 {
    public static void main(String[] args) {
        //1.Getter Method
        String path = "C:\\test";
        System.out.println(FilenameUtils.getBaseName(path));//test
        System.out.println(FilenameUtils.getExtension(path));//csv
        System.out.println(FilenameUtils.getFullPath(path));//C:\test\
        System.out.println(FilenameUtils.getName(path));//test.csv
        System.out.println(FilenameUtils.getPath(path));//test\
        System.out.println(FilenameUtils.getPrefix(path));//C:\
    }
}
